# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=monolith
pkgver=2.8.1
pkgrel=0
pkgdesc="CLI tool for saving complete web pages as a single HTML file"
url="https://github.com/Y2Z/monolith"
# riscv64: rust is broken on this arch
arch="all !riscv64"
license="CC0-1.0"
makedepends="
	cargo
	cargo-auditable
	openssl-dev
	"
source="https://github.com/Y2Z/monolith/archive/v$pkgver/monolith-$pkgver.tar.gz"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
31bc8c82393ddd3e55d2fd1f13f60fcf2591b1718a077668e240853ee782c8ebbb3b32c88e89ae2d8bb5958277d4619919e596e815df42dbca51f1e0477eb7f5  monolith-2.8.1.tar.gz
"
